package org.lboot.idmo.module.rsr.params;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "资源创建参数")
public class RsrCreateParams {
    @ApiModelProperty(value = "父级菜单")
    Long parentId;

    @NotBlank(message = "编码不可为空")
    @ApiModelProperty(value = "编码")
    String code;

    @NotBlank(message = "名称不可为空")
    @ApiModelProperty(value = "名称")
    String name;

    @NotBlank(message = "菜单图标不可为空")
    @ApiModelProperty(value = "菜单图标")
    String icon;

    @NotBlank(message = "类型不可为空")
    @ApiModelProperty(value = "类型")
    String type;

    @ApiModelProperty(value = "路由地址")
    String path;

    @ApiModelProperty(value = "组件路径")
    String component;

    @ApiModelProperty(value = "layout")
    String layout;

    @NotNull(message = "是否显示不可为空")
    @ApiModelProperty(value = "是否显示")
    Boolean show;

    @NotNull(message = "是否启用不可为空")
    @ApiModelProperty(value = "是否启用")
    Boolean enable;

    @ApiModelProperty(value = "keepAlive")
    String keepAlive;

    @Min(value = 0,message = "排序 > 0")
    @ApiModelProperty(value = "排序")
    Integer orderNum;

    @ApiModelProperty(value = "描述")
    String description;
}
